module.exports = {
  up: async (queryInterface, Sequelize) => {
    const { INTEGER, STRING } = Sequelize;
    await queryInterface.createTable('users', {
      userId: { type: INTEGER, primaryKey: true, autoIncrement: true },
      username: { type: STRING(50), allowNull: false },
      password: { type: STRING(50), allowNull: false },
      gender: { type: STRING(50), allowNull: true },
      avatar: { type: STRING(500), allowNull: true },
      nickname: { type: STRING(50), allowNull: true },
      area: { type: STRING(50), allowNull: true },
      birthday: { type: STRING(20), allowNull: true },
      height: { type: INTEGER, allowNull: true },
      motto: { type: STRING(100), allowNull: true },
    });
  },

  down: async (queryInterface) => {
    await queryInterface.dropTable('users');
  },
};
